package com.tedu.pj.common.webconf;

import com.tedu.pj.common.filter.myFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>
 *
 * </p>
 *
 * @author Song
 * @since 2020/10/21
 */
@Configuration
public class FilterConfig {
    @Bean
    public FilterRegistrationBean filterRegistrationBean() {

        FilterRegistrationBean filterRegistration = new FilterRegistrationBean();
        filterRegistration.setFilter(new myFilter());
        filterRegistration.addUrlPatterns("/*");
        return filterRegistration;
    }
}
